Ejercicio 1

Contents

Apartado d)

t=linspace(0,1);
V=[1 2 4 4.6;1 3 -1 1.5];
plot(V(1,:),V(2,:),'-o')
n=size(V);
n=n(2);
s=size(t);
x=zeros(n,s(2));
y=zeros(n,s(2));
for i=1:n
    x(i,:)=bernstein(n-1,i-1,t)*V(1,i);
    y(i,:)=bernstein(n-1,i-1,t)*V(2,i);
end
a=sum(x);
b=sum(y);
hold on
plot(a,b)